<?php
class Holiday_info_model extends CI_Model{

	function getAllHolidayInfo(){
		$data=$this->db->get('holiday_info');
		return $data;
	}

	function delHolidayInfo($id){
		$this->db->where('id',$id);
		$data=$this->db->delete('holiday_info');
		return $data;
	}

	function getHolidayInfo($id){
		$this->db->where('id',$id);
		$data=$this->db->get('holiday_info');
		return $data;
	}

	function  addHolidayInfo(){
		$data=array(
				'holidayna'=>$_POST['holidayna'],
				'holidaytime'=>$_POST['holidaytime'], 
		);
		$this->db->insert('holiday_info',$data);
		return $this->db->insert_id();
	}

	function  updateHolidayInfo($id,$data){
		$this->db->where('id',$id);
		$this->db->update('holiday_info',$data);
	}
}
?>